﻿using Myu.EventBus.Core;
using Myu.EventBus.Event;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace EventBusTest
{
    class Program
    {
        static void Main(string[] args)
        {

            //初始化事件总线
            EventBus.InstanceForXml();
            EventBus.Instance.Publish(new MyuEvent() { Name = "于旭轩" }, Callback);
            Console.ReadKey();

        }


        public static void  Callback(MyuEvent myuEvent, bool b, Exception e)
        {
            Console.WriteLine($"{myuEvent.Name}执行成功");
        }
    }
}
